package com.example.newmessageboard.Service;

import com.example.newmessageboard.mapper.MessageMapper;
import com.example.newmessageboard.model.Messageinfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MessageService {
    @Autowired
    private MessageMapper messageMapper;
    public Integer InsertMessage(Messageinfo messageinfo) {
        Integer n=messageMapper.insertMessageinfo(messageinfo);
        return n;
    }
    public List<Messageinfo> getMessageinfo() {
       return  messageMapper.getMessageinfo();
    }
}
